﻿using System.ComponentModel;
using Microsoft.Windows.Design;
using Microsoft.Windows.Design.Features;
using Microsoft.Windows.Design.Metadata;

namespace ZoomTextBoxPhone.Design
{
    internal class ZoomTextBoxControlMetadata : AttributeTableBuilder
    {
        public ZoomTextBoxControlMetadata()
        {
            // Type attributes
            AddCustomAttributes(typeof(ZoomTextBoxControl), new DescriptionAttribute("Represents a Textbox with font size Zoom."));
            AddCustomAttributes(typeof(ZoomTextBoxControl), new FeatureAttribute(typeof(ZoomTextBoxInitializer)));

            // Property attributes
            AddCustomAttributes(typeof(ZoomTextBoxControl), "ZoomMaxSize", new CategoryAttribute(MetadataStore.ControlProperties));
            AddCustomAttributes(typeof(ZoomTextBoxControl), "ZoomMaxSize", new DescriptionAttribute("Gets or sets the maximum font size zoom."));

            AddCustomAttributes(typeof(ZoomTextBoxControl), "ZoomSteps", new CategoryAttribute(MetadataStore.ControlProperties));
            AddCustomAttributes(typeof(ZoomTextBoxControl), "ZoomSteps", new DescriptionAttribute("Gets or sets the Pinch step  between original size and ZoomMaxSize."));

            AddCustomAttributes(typeof(ZoomTextBoxControl), "CurrentZoomStep", new CategoryAttribute(MetadataStore.ControlProperties));
            AddCustomAttributes(typeof(ZoomTextBoxControl), "CurrentZoomStep", new DescriptionAttribute("Gets or sets the current step zoom size."));

        }
    }
}
